/**
 * 构造函数首字母大写的普通函数
 * 调用使用new关键字
 */

function Person(name, age) {
  this.name = name;
  this.age = age;
  this.sayName = sayName; // 提到全局作用域中
}

function sayName() {
  console.log(this.name);
}

var p1 = new Person("xx", 18);
var p2 = new Person("yy", 28);

console.log(p1.sayName === p2.sayName);
